import request from '@/utils/request'

//当get请求的时候用 params
//查询         展示列表数据查询所有数据
export function unitGoodsList(params) {
    return request({
      url: '/goods/goodsList/pageGoodsList',
      method: 'get',
      params
    })
  }
//添加          添加数据
export function addGoodsList(data) {
    return request({
      url: '/goods/goodsList/addGoodsList',
      method: 'post',
      data
    })
  }
//修改          修改前先根据id查询数据
export function findGoodsListByid(params) {
    return request({
      url: '/goods/goodsList/findGoodsListById',
      method: 'get',
      params:{id:params}
    })
  }
//修改          修改数据
export function updateGoodsList(data) {
    return request({
      url: '/goods/goodsList/updateGoodsList',
      method: 'post',
      data
    })
  }
//删除          根据id删除数据
export function delById(params) {
    return request({
      url: '/goods/goodsList/delGoodsList',
      method: 'get',
      params:{id:params}
    })
  }
//批量删除      批量删除数据
export function delBatch(params) {
    return request({
      url: '/goods/goodsList/delBatchGoodsList',
      method: 'get',
      params:{ids:params}
    })
  }

  